// MyConn.h: interface for the MyConn class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_MYCONN_H__CAB5E401_A044_4570_94FE_BE5726AEEE69__INCLUDED_)
#define AFX_MYCONN_H__CAB5E401_A044_4570_94FE_BE5726AEEE69__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "Ado.h"

class CMyConn : public CAdoConnection  
{
private:
	CMyConn();
	static CMyConn *p_Conn;
	static CMyConn *p_Conn2;

public:
	int FindVin( CString strVin );
	int CleanAllRecord();
	static int CompactDatabase(LPCTSTR src, LPCTSTR srcpwd, LPCTSTR dest, LPCTSTR destpwd);
	int GetInfoFromCarType(TCHAR *pVin, TCHAR *pEngType,  TCHAR *pEngPower, TCHAR *pEngRate, TCHAR *pCarType, TCHAR *pBrand, TCHAR *pWeigh, TCHAR *pSeat);
	int GetInfoFromNoMark(TCHAR *pEngType, TCHAR *pEngPower, TCHAR *pEngRate, TCHAR *pCarType, TCHAR *pBrand, TCHAR *pWeigh, TCHAR *pSeat, TCHAR *pMadeData);
	
	int InsertRecMsg(TCHAR *pVin, TCHAR *pDate=_T(""),int iFlag=0);
	

	int FindEngineType( char *pchEngineType);
//	int ShowRecordToList( CAdoRecordSet &m_ret, CListCtrl  &list, int imode=0);
//	int ShowRecordToGrid( CAdoRecordSet &m_ret, CGridCtrl &grid , int imode=0);
	virtual ~CMyConn();
	static CMyConn *GetConn();
	static CMyConn *GetConn2();

	static void Destroy();
};

#endif // !defined(AFX_MYCONN_H__CAB5E401_A044_4570_94FE_BE5726AEEE69__INCLUDED_)
